/*
 * Button.hpp
 *
 *  Created on: 24-11-2010
 *      Author: Przemek
 */

#pragma once

#include "Control.hpp"
#include "pch.hpp"

class Button: public Control
{
	public:
		enum State
		{
			NORMAL, HOVERED, PRESSED
		};

	private:
		std::string text;
		State state;

	public:
		Button(const std::string& text = "");

		void setText(const std::string& text);
		std::string getText() const;
		void draw(const ClipArea& clipArea);
		virtual ~Button();

	private:
		void setInsideButtonColor() const;

		virtual void mousePressed(const MouseListener::EventArguments& arguments);
		virtual void mouseEntered();
		virtual void mouseExited();
		virtual void mouseReleased(const MouseListener::EventArguments& arguments);
};
